gdk: Make GDK_DEBUG GL backend selection global
authorBenjamin Otte <otte@redhat.com>
Sat, 2 Oct 2021 03:21:29 +0000 (05:21 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 5 Oct 2021 02:48:15 +0000 (04:48 +0200)
commit38461ee204edfbc1da3a27d306a3d4399c79bd92
tree8c1c523c5c465fbfa4f5e5f013ddf26b568599dd
parent75370a2feef339a2b3e9eb2f0c28c590ccf21bbf
gdk: Make GDK_DEBUG GL backend selection global

We have a global GdkGLBackendType now, just set it.

This way, using the variable forces the backend type, and we don't need
special code handling the env vars in the backends.

It also means setting the env var will now "work" on GDK backends that
don't even support that GL backend and simualte another GDK backend
having registered that GL backend already. So you can run
  GDK_DEBUG=gl-wgl gtk4-demo
on test what Wayland will do when WGL is in use.
gdk/gdk.c
gdk/win32/gdkdisplay-win32.c
gdk/x11/gdkdisplay-x11.c